<!DOCTYPE html>
<html lang="en-us">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    
<meta charset="UTF-8">
<title>Mapping | Elasticsearch Guide [7.7] | Elastic</title>
<link rel="home" href="index.html" title="Elasticsearch Guide [7.7]">
<link rel="up" href="index.html" title="Elasticsearch Guide [7.7]">
<link rel="prev" href="modules-scripting-engine.html" title="Advanced scripts using script engines">
<link rel="next" href="removal-of-types.html" title="Removal of mapping types">
<meta name="DC.type" content="Learn/Docs/Elasticsearch/Reference/7.7">
<meta name="DC.subject" content="Elasticsearch">
<meta name="DC.identifier" content="7.7">
<meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="https://cdn.optimizely.com/js/18132920325.js"></script>
    <link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/manifest.json">
    <meta name="apple-mobile-web-app-title" content="Elastic">
    <meta name="application-name" content="Elastic">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="/mstile-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <meta name="naver-site-verification" content="936882c1853b701b3cef3721758d80535413dbfd">
    <meta name="yandex-verification" content="d8a47e95d0972434">
    <meta name="localized" content="true">
    <meta name="st:robots" content="follow,index">
    <meta property="og:image" content="https://www.elastic.co/static/images/elastic-logo-200.png">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link rel="apple-touch-icon-precomposed" sizes="64x64" href="/favicon_64x64_16bit.png">
    <link rel="apple-touch-icon-precomposed" sizes="32x32" href="/favicon_32x32.png">
    <link rel="apple-touch-icon-precomposed" sizes="16x16" href="/favicon_16x16.png">
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/guide/static/styles.css">
  </head>

  <!--© 2015-2021 Elasticsearch B.V. Copying, publishing and/or distributing without written permission is strictly prohibited.-->

  <body>
    <!-- Google Tag Manager -->
    <script>dataLayer = [];</script><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-58RLH5" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-58RLH5');</script>
    <!-- End Google Tag Manager -->

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12395217-16"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
      gtag('config', 'UA-12395217-16');
    </script>

    <!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->
    <script type="text/javascript">
      (function(){var g=function(e,h,f,g){
      this.get=function(a){for(var a=a+"=",c=document.cookie.split(";"),b=0,e=c.length;b<e;b++){for(var d=c[b];" "==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};
      this.set=function(a,c){var b="",b=new Date;b.setTime(b.getTime()+6048E5);b="; expires="+b.toGMTString();document.cookie=a+"="+c+b+"; path=/; "};
      this.check=function(){var a=this.get(f);if(a)a=a.split(":");else if(100!=e)"v"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(":"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case "v":return!1;case "r":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(":")),!c}return!0};
      this.go=function(){if(this.check()){var a=document.createElement("script");a.type="text/javascript";a.src=g;document.body&&document.body.appendChild(a)}};
      this.start=function(){var a=this;window.addEventListener?window.addEventListener("load",function(){a.go()},!1):window.attachEvent&&window.attachEvent("onload",function(){a.go()})}};
      try{(new g(100,"r","QSI_S_ZN_emkP0oSe9Qrn7kF","https://znemkp0ose9qrn7kf-elastic.siteintercept.qualtrics.com/WRSiteInterceptEngine/?Q_ZID=ZN_emkP0oSe9Qrn7kF")).start()}catch(i){}})();
    </script><div id="ZN_emkP0oSe9Qrn7kF"><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>
    <!--END WEBSITE FEEDBACK SNIPPET-->

    <div id="elastic-nav" style="display:none;"></div>
    <script src="https://www.elastic.co/elastic-nav.js"></script>

    <!-- Subnav -->
    <div>
      <div>
        <div class="tertiary-nav d-none d-md-block">
          <div class="container">
            <div class="p-t-b-15 d-flex justify-content-between nav-container">
              <div class="breadcrum-wrapper"><span><a href="/guide/" style="font-size: 14px; font-weight: 600; color: #000;">Docs</a></span></div>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="main-container">
      <section id="content">
        <div class="content-wrapper">

          <section id="guide" lang="en">
            <div class="container">
              <div class="row">
                <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                  <!-- start body -->
                  <div class="page_header">
<strong>IMPORTANT</strong>: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
<a href="../current/index.html">current release documentation</a>.
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-node">Mapping</span>
</div>
<div class="navheader">
<span class="prev">
<a href="modules-scripting-engine.html">« Advanced scripts using script engines</a>
</span>
<span class="next">
<a href="removal-of-types.html">Removal of mapping types »</a>
</span>
</div>
<div class="part">
<div class="titlepage"><div><div>
<h1 class="title">
<a id="mapping"></a>Mapping<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h1>
</div></div></div>
<div class="openblock partintro">
<div class="content">
<p>Mapping is the process of defining how a document, and the fields it contains,
are stored and indexed. For instance, use mappings to define:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
which string fields should be treated as full text fields.
</li>
<li class="listitem">
which fields contain numbers, dates, or geolocations.
</li>
<li class="listitem">
the <a class="xref" href="mapping-date-format.html" title="format">format</a> of date values.
</li>
<li class="listitem">
custom rules to control the mapping for
<a class="xref" href="dynamic-mapping.html" title="Dynamic Mapping">dynamically added fields</a>.
</li>
</ul>
</div>
<p>A mapping definition has:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<a class="xref" href="mapping-fields.html" title="Meta-Fields">Meta-fields</a>
</span>
</dt>
<dd>
Meta-fields are used to customize how a document’s associated metadata is
treated. Examples of meta-fields include the document’s
<a class="xref" href="mapping-index-field.html" title="_index field"><code class="literal">_index</code></a>, <a class="xref" href="mapping-id-field.html" title="_id field"><code class="literal">_id</code></a>, and
<a class="xref" href="mapping-source-field.html" title="_source field"><code class="literal">_source</code></a> fields.
</dd>
<dt>
<span class="term">
<a class="xref" href="mapping-types.html" title="Field datatypes">Fields</a> or <em>properties</em>
</span>
</dt>
<dd>
A mapping contains a list of fields or <code class="literal">properties</code> pertinent to the
document.
</dd>
</dl>
</div>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>Before 7.0.0, the <em>mappings</em> definition used to include a type name.
For more details, please see <a class="xref" href="removal-of-types.html" title="Removal of mapping types"><em>Removal of mapping types</em></a>.</p>
</div>
</div>
<h2>
<a id="field-datatypes"></a>Field datatypes<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>Each field has a data <code class="literal">type</code> which can be:</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
a simple type like <a class="xref" href="text.html" title="Text datatype"><code class="literal">text</code></a>, <a class="xref" href="keyword.html" title="Keyword datatype"><code class="literal">keyword</code></a>, <a class="xref" href="date.html" title="Date datatype"><code class="literal">date</code></a>, <a class="xref" href="number.html" title="Numeric datatypes"><code class="literal">long</code></a>,
<a class="xref" href="number.html" title="Numeric datatypes"><code class="literal">double</code></a>, <a class="xref" href="boolean.html" title="Boolean datatype"><code class="literal">boolean</code></a> or <a class="xref" href="ip.html" title="IP datatype"><code class="literal">ip</code></a>.
</li>
<li class="listitem">
a type which supports the hierarchical nature of JSON such as
<a class="xref" href="object.html" title="Object datatype"><code class="literal">object</code></a> or <a class="xref" href="nested.html" title="Nested datatype"><code class="literal">nested</code></a>.
</li>
<li class="listitem">
or a specialised type like <a class="xref" href="geo-point.html" title="Geo-point datatype"><code class="literal">geo_point</code></a>,
<a class="xref" href="geo-shape.html" title="Geo-shape datatype"><code class="literal">geo_shape</code></a>, or <a class="xref" href="search-suggesters.html#completion-suggester" title="Completion Suggester"><code class="literal">completion</code></a>.
</li>
</ul>
</div>
<p>It is often useful to index the same field in different ways for different
purposes. For instance, a <code class="literal">string</code> field could be <a class="xref" href="mapping-index.html" title="index">indexed</a> as
a <code class="literal">text</code> field for full-text search, and as a <code class="literal">keyword</code> field for
sorting or aggregations.  Alternatively, you could index a string field with
the <a class="xref" href="analysis-standard-analyzer.html" title="Standard Analyzer"><code class="literal">standard</code> analyzer</a>, the
<a class="xref" href="analysis-lang-analyzer.html#english-analyzer" title="english analyzer"><code class="literal">english</code></a> analyzer, and the
<a class="xref" href="analysis-lang-analyzer.html#french-analyzer" title="french analyzer"><code class="literal">french</code> analyzer</a>.</p>
<p>This is the purpose of <em>multi-fields</em>.  Most datatypes support multi-fields
via the <a class="xref" href="multi-fields.html" title="fields"><code class="literal">fields</code></a> parameter.</p>
<h3>
<a id="mapping-limit-settings"></a>Settings to prevent mappings explosion<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h3>
<p>Defining too many fields in an index can lead to a
mapping explosion, which can cause out of memory errors and difficult
situations to recover from.</p>
<p>Consider a situation where every new document inserted
introduces new fields, such as with <a class="xref" href="dynamic-mapping.html" title="Dynamic Mapping">dynamic mapping</a>.
Each new field is added to the index mapping, which can become a
problem as the mapping grows.</p>
<p>Use the following settings to limit the number of field mappings (created manually or dynamically) and prevent documents from causing a mapping explosion:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">index.mapping.total_fields.limit</code>
</span>
</dt>
<dd>
<p>
The maximum number of fields in an index. Field and object mappings, as well as
field aliases count towards this limit. The default value is <code class="literal">1000</code>.
</p>
<div class="important admon">
<div class="icon"></div>
<div class="admon_content">
<p>The limit is in place to prevent mappings and searches from becoming too
large. Higher values can lead to performance degradations and memory issues,
especially in clusters with a high load or few resources.</p>
<p>If you increase this setting, we recommend you also increase the
<a class="xref" href="search-settings.html" title="Search settings"><code class="literal">indices.query.bool.max_clause_count</code></a> setting, which
limits the maximum number of <a class="xref" href="query-dsl-bool-query.html" title="Boolean query">boolean clauses</a> in a query.</p>
</div>
</div>
<div class="tip admon">
<div class="icon"></div>
<div class="admon_content">
<p>If your field mappings contain a large, arbitrary set of keys, consider using the <a class="xref" href="flattened.html" title="Flattened datatype">flattened</a> datatype.</p>
</div>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">index.mapping.depth.limit</code>
</span>
</dt>
<dd>
The maximum depth for a field, which is measured as the number of inner
objects. For instance, if all fields are defined at the root object level,
then the depth is <code class="literal">1</code>. If there is one object mapping, then the depth is
<code class="literal">2</code>, etc. Default is <code class="literal">20</code>.
</dd>
</dl>
</div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">index.mapping.nested_fields.limit</code>
</span>
</dt>
<dd>
The maximum number of distinct <code class="literal">nested</code> mappings in an index. The <code class="literal">nested</code> type should only be used in special cases, when arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this setting
limits the number of unique <code class="literal">nested</code> types per index. Default is <code class="literal">50</code>.
</dd>
</dl>
</div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">index.mapping.nested_objects.limit</code>
</span>
</dt>
<dd>
The maximum number of nested JSON objects that a single document can contain across all
<code class="literal">nested</code> types. This limit helps to prevent out of memory errors when a document contains too many nested
objects. Default is <code class="literal">10000</code>.
</dd>
<dt>
<span class="term">
<code class="literal">index.mapping.field_name_length.limit</code>
</span>
</dt>
<dd>
Setting for the maximum length of a field name. This setting isn’t really something that addresses
mappings explosion but might still be useful if you want to limit the field length.
It usually shouldn’t be necessary to set this setting. The default is okay
unless a user starts to add a huge number of fields with really long names. Default is
<code class="literal">Long.MAX_VALUE</code> (no limit).
</dd>
</dl>
</div>
<h2>
<a id="_dynamic_mapping"></a>Dynamic mapping<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>Fields and mapping types do not need to be defined before being used. Thanks
to <em>dynamic mapping</em>, new field names will be added automatically, just by
indexing a document. New fields can be added both to the top-level mapping
type, and to inner <a class="xref" href="object.html" title="Object datatype"><code class="literal">object</code></a>  and <a class="xref" href="nested.html" title="Nested datatype"><code class="literal">nested</code></a> fields.</p>
<p>The <a class="xref" href="dynamic-mapping.html" title="Dynamic Mapping">dynamic mapping</a> rules can be configured to customise
the mapping that is used for new fields.</p>
<h2>
<a id="_explicit_mappings"></a>Explicit mappings<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>You know more about your data than Elasticsearch can guess, so while dynamic
mapping can be useful to get started, at some point you will want to specify
your own explicit mappings.</p>
<p>You can create field mappings when you <a class="xref" href="mapping.html#create-mapping" title="Create an index with an explicit mapping">create an index</a> and
<a class="xref" href="mapping.html#add-field-mapping" title="Add a field to an existing mapping">add fields to an existing index</a>.</p>
<h2>
<a id="create-mapping"></a>Create an index with an explicit mapping<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>You can use the <a class="xref" href="indices-create-index.html" title="Create index API">create index</a> API to create a new index
with an explicit mapping.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">PUT /my-index
{
  "mappings": {
    "properties": {
      "age":    { "type": "integer" },  <a id="CO283-1"></a><i class="conum" data-value="1"></i>
      "email":  { "type": "keyword"  }, <a id="CO283-2"></a><i class="conum" data-value="2"></i>
      "name":   { "type": "text"  }     <a id="CO283-3"></a><i class="conum" data-value="3"></i>
    }
  }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/603.console"></div>
<div class="calloutlist">
<table border="0" summary="Callout list">
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO283-1"><i class="conum" data-value="1"></i></a></p>
</td>
<td align="left" valign="top">
<p>Creates <code class="literal">age</code>, an <a class="xref" href="number.html" title="Numeric datatypes"><code class="literal">integer</code></a> field</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO283-2"><i class="conum" data-value="2"></i></a></p>
</td>
<td align="left" valign="top">
<p>Creates <code class="literal">email</code>, a <a class="xref" href="keyword.html" title="Keyword datatype"><code class="literal">keyword</code></a> field</p>
</td>
</tr>
<tr>
<td align="left" valign="top" width="5%">
<p><a href="#CO283-3"><i class="conum" data-value="3"></i></a></p>
</td>
<td align="left" valign="top">
<p>Creates <code class="literal">name</code>, a <a class="xref" href="text.html" title="Text datatype"><code class="literal">text</code></a> field</p>
</td>
</tr>
</table>
</div>
<h2>
<a id="add-field-mapping"></a>Add a field to an existing mapping<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>You can use the <a class="xref" href="indices-put-mapping.html" title="Put mapping API">put mapping</a> API to add one or more new
fields to an existing index.</p>
<p>The following example adds <code class="literal">employee-id</code>, a <code class="literal">keyword</code> field with an
<a class="xref" href="mapping-index.html" title="index"><code class="literal">index</code></a> mapping parameter value of <code class="literal">false</code>. This means values
for the <code class="literal">employee-id</code> field are stored but not indexed or available for search.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">PUT /my-index/_mapping
{
  "properties": {
    "employee-id": {
      "type": "keyword",
      "index": false
    }
  }
}</pre>
</div>
<div class="console_widget" data-snippet="snippets/604.console"></div>
<h3>
<a id="update-mapping"></a>Update the mapping of a field<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h3>
<p>Except for supported <a class="xref" href="mapping-params.html" title="Mapping parameters">mapping parameters</a>,
you can’t change the mapping or field type of an existing field.
Changing an existing field could invalidate data that’s already indexed.</p>
<p>If you need to change the mapping of a field,
create a new index with the correct mapping
and <a class="xref" href="docs-reindex.html" title="Reindex API">reindex</a> your data into that index.</p>
<p>Renaming a field would invalidate data already indexed under the old field name.
Instead, add an <a class="xref" href="alias.html" title="Alias datatype"><code class="literal">alias</code></a> field to create an alternate field name.</p>
<h2>
<a id="view-mapping"></a>View the mapping of an index<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>You can use the <a class="xref" href="indices-get-mapping.html" title="Get mapping API">get mapping</a> API to view the mapping of
an existing index.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /my-index/_mapping</pre>
</div>
<div class="console_widget" data-snippet="snippets/605.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">{
  "my-index" : {
    "mappings" : {
      "properties" : {
        "age" : {
          "type" : "integer"
        },
        "email" : {
          "type" : "keyword"
        },
        "employee-id" : {
          "type" : "keyword",
          "index" : false
        },
        "name" : {
          "type" : "text"
        }
      }
    }
  }
}</pre>
</div>
<h2>
<a id="view-field-mapping"></a>View the mapping of specific fields<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/mapping.asciidoc">edit</a>
</h2>
<p>If you only want to view the mapping of one or more specific fields, you can use
the <a class="xref" href="indices-get-field-mapping.html" title="Get field mapping API">get field mapping</a> API.</p>
<p>This is useful if you don’t need the complete mapping of an index or your index
contains a large number of fields.</p>
<p>The following request retrieves the mapping for the <code class="literal">employee-id</code> field.</p>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET /my-index/_mapping/field/employee-id</pre>
</div>
<div class="console_widget" data-snippet="snippets/606.console"></div>
<p>The API returns the following response:</p>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">{
  "my-index" : {
    "mappings" : {
      "employee-id" : {
        "full_name" : "employee-id",
        "mapping" : {
          "employee-id" : {
            "type" : "keyword",
            "index" : false
          }
        }
      }
    }
  }
}</pre>
</div>
</div>
</div>





</div>
<div class="navfooter">
<span class="prev">
<a href="modules-scripting-engine.html">« Advanced scripts using script engines</a>
</span>
<span class="next">
<a href="removal-of-types.html">Removal of mapping types »</a>
</span>
</div>
</div>

                  <!-- end body -->
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                  <div id="rtpcontainer" style="display: block;">
                    <div class="mktg-promo">
                      <h3>Most Popular</h3>
                      <ul class="icons">
                        <li class="icon-elasticsearch-white"><a href="https://www.elastic.co/webinars/getting-started-elasticsearch?baymax=default&amp;elektra=docs&amp;storm=top-video">Get Started with Elasticsearch: Video</a></li>
                        <li class="icon-kibana-white"><a href="https://www.elastic.co/webinars/getting-started-kibana?baymax=default&amp;elektra=docs&amp;storm=top-video">Intro to Kibana: Video</a></li>
                        <li class="icon-logstash-white"><a href="https://www.elastic.co/webinars/introduction-elk-stack?baymax=default&amp;elektra=docs&amp;storm=top-video">ELK for Logs &amp; Metrics: Video</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </section>

        </div>


<div id="elastic-footer"></div>
<script src="https://www.elastic.co/elastic-footer.js"></script>
<!-- Footer Section end-->

      </section>
    </div>

<script src="/guide/static/jquery.js"></script>
<script type="text/javascript" src="/guide/static/docs.js"></script>
<script type="text/javascript">
  window.initial_state = {}</script>
  </body>
</html>
